package system

import (
	"gin-admin/handler"
	"gin-admin/middleware"

	"github.com/gin-gonic/gin"
)

func RegisterMenuRoutes(group *gin.RouterGroup) {
	menuGroup := group.Group("/menu")
	handlerApp := handler.NewHandlerApp(nil)
	menuGroup.Use(middleware.AuthorizationMiddleware())
	{
		menuGroup.POST("/create", handlerApp.V1App.MenuHandler.CreateMenuHandler)
		menuGroup.DELETE("/delete", handlerApp.V1App.MenuHandler.DeleteMenuHandler)
		menuGroup.PUT("/modify", handlerApp.V1App.MenuHandler.ModifyMenuHandler)
		menuGroup.GET("/info/:id", handlerApp.V1App.MenuHandler.GetMenuInfoHandler)
		menuGroup.GET("/list", handlerApp.V1App.MenuHandler.GetMenuListHandler)
	}
}
